<template>
  <div class="onekit-navigation-bar"
       :class="onekitClass"
       :style="onekitStyle"
       :id="onekitId">
    <slot></slot>
  </div>
</template>

<script>
import weixin_behavior from "../../behaviors/weixin_behavior"
import onekit_behavior from "../../behaviors/onekit_behavior"
import wx from '../../wx'
//const wx = new WX()
export default {
  name: "onekit-navigation-bar",
  mixins: [weixin_behavior, onekit_behavior],
  props: {
    'title': String,
    'loading': [Boolean, String],
    'font-color': String,
    'background-color': String,
    'color-animation-duration': {
      // eslint-disable-next-line vue/require-prop-type-constructor
      type: [String, Number],
      default: 0
    },
    'color-animation-timing-func': {
      type: String,
      default: 'linear'
    }
  },
  methods: {
    mounted () {
      const title = this.title
      wx.setNavigationBarTitle({
        title
      })
    }
  }
}
</script>

<style>
</style>
